Skip to content

Implement Fisher-Yates shuffle - it's fast and actually random#156

Open
pdf wants to merge 1 commit intojplayer:masterfrom
pdf:efficient_random_shuffle
Open

Implement Fisher-Yates shuffle - it's fast and actually random#156
pdf wants to merge 1 commit intojplayer:masterfrom
pdf:efficient_random_shuffle

Conversation

@pdf
Copy link

@pdf pdf commented Apr 23, 2013

Using the sort method tends to result in tracks towards the beginning or end
of the playlist having a 50% chance to not move at all. Fisher-Yates gives
good distribution across the whole playlist. Performance should be pretty
decent too.

Using the sort method tends to result in tracks towards the beginning or
end of the playlist having a 50% chance to not move at all.
Fisher-Yates gives good distribution across the whole playlist.
Performance should be pretty decent too.
@thepag
Copy link
Contributor

thepag commented Nov 20, 2014

This is generic notification that all users issuing pull requests must sign our CLA before we can consider merging with the jPlayer project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants